package com.vkmessenger.gui.activities.search;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.vkmessenger.R;
import com.vkmessenger.core.friends.Friend;
import com.vkmessenger.core.localcache.Cache;

import java.util.logging.Logger;

/**
 * Created by IntelliJ IDEA.
 * User: Evgeniy Krasko
 * Date: 24.05.12
 * Time: 9:14
 */
public class SearchActivity extends Activity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.search);
        setFriendRequests();
    }

    protected void setFriendRequests(){
        LinearLayout layout = (LinearLayout)findViewById(R.id.friend_requests);
        synchronized (Cache.INSTANCE.friendRequests){
            for (Friend friend: Cache.INSTANCE.friendRequests){
                TextView tv = new TextView(this);
                tv.setHeight(20);
                tv.setWidth(20);
                //tv.setTextColor(0);
                tv.setTextSize(18);
                tv.setText("" + friend.getUid());
                layout.addView(tv);
            }
        }
    }

}
